package com.kunbo.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class AlphaAspect {

    @Pointcut("execution(* com.kunbo.service.*.*(..))")
    public void pointcut(){

    }

    @Before("pointcut()")
    public void before(){

    }

    @AfterReturning("pointcut()")
    public void afterReturning(){

    }

    @AfterThrowing("pointcut()")
    public void AfterThrowing(){

    }

    @Around("pointcut()")
    public Object around(ProceedingJoinPoint joinPoint) throws Throwable{
        System.out.println();
        Object proceed = joinPoint.proceed();
        System.out.println();
        return proceed;
    }
}
